<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增审批资格')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-approval-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">审批领导名称：</label>
                <div class="col-sm-8">
                    <select id="userId" name = "userId"  class="form-control m-b">
                        <option th:each="user : ${userlist}" th:value="${user.userId}+','+${user.loginName}"
                                th:text="${user.loginName}"></option>
                    </select>
                   <!-- <input name="name" class="form-control" type="text">-->
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">职务：</label>
                <div class="col-sm-8">
                    <input name="position" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">所属处室：</label>
               <!-- <div class="col-sm-8">
                    <input name="belongDept" class="form-control" type="text">
                </div>-->
                <div class="col-sm-8">
                    <select id="belongDept" name = "belongDept"  class="form-control m-b">
                        <option th:each="dept : ${deptList}" th:value="${dept.deptId}"
                                th:text="${dept.deptName}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否具备审批资格：</label>
                <div class="col-sm-8">
                    <select id="approvalQualification" name="approvalQualification">
                        <option value="1">是</option>
                        <option value="0">否</option>
                    </select>
                   <!-- <input name="approvalQualification" class="form-control" type="text">-->
                </div>
            </div>


        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/approval"
        $("#form-approval-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-approval-add').serialize());
            }
        }
    </script>
</body>
</html>